<?
session_start();
include('conn.php');
$qry1 = "SELECT * from society where status = '1' order by socid desc";

$qry = mysql_query($qry1);
$data = array();

while($rows = mysql_fetch_array($qry))
{
	$data[] = array
		(			
			"id" => $rows['socid'],			
			"name" => $rows['societyname'],
			"addr" => $rows['address'],
			"locality" => $rows['locality'],
			"district" => $rows['district'],
			"road" => $rows['road'],
			"zip" => $rows['zipcode']			
		);
}
echo json_encode($data);
?>